package main

import "fmt"

type Teacher struct {
	Name  string
	Age   int
	Title string
}

func (t Teacher) teacherInfo() {
	fmt.Printf("姓名:%s,年龄:%d,职称:%s", t.Name, t.Age, t.Title)

}

type Course struct {
	Teacher Teacher
	Name    string
	Price   int
	Url     string
}

func (c Course) courseInfo() {
	fmt.Printf("课程名:%d,价格:%d,讲师信息:%s,%d,%s\n", c.courseInfo, c.Price, c.Teacher.Name, c.Teacher.Age, c.Teacher.Title)
}

func main() {
	t := Teacher{
		Name:  "hcj",
		Age:   18,
		Title: "程序员",
	}
	c := Course{
		Teacher: t,
		Price:   100,
		Url:     "",
		Name:    "django",
	}
	c.courseInfo()
}
